# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=vte3
pkgver=0.60.3
pkgrel=2
pkgdesc="Virtual Terminal Emulator library"
url="https://developer.gnome.org/vte/"
arch="all"
license="LGPL-2.0-or-later"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-lang"
makedepends="pango-dev gtk+3.0-dev intltool
	ncurses-dev gobject-introspection-dev vala gnutls-dev
	linux-headers libxml2-utils pcre2-dev gperf
	meson gtk-doc icu-dev"
source="https://download.gnome.org/sources/vte/${pkgver%.*}/vte-$pkgver.tar.xz
	fix-W_EXITCODE.patch
	vte-ng.patch
	no-setenv-after-fork.patch
	"

builddir="$srcdir/vte-$pkgver"

build() {
	meson \
		--buildtype=plain \
		-Ddocs=false \
		--prefix=/usr \
		--sysconfdir=/etc \
		--libexecdir=/usr/lib/$pkgname \
		-D_systemd=false \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}
sha512sums="3694fe711e0b3eb9d6ba37ad8036f5d3cca4265635ed7afcde750a8445b17f820d1c55b557d0ea1c8a5a45e5408915d8da2ffd65b4d397c6582f288812ae1f18  vte-0.60.3.tar.xz
94de7160b71f1c41aa19e8f9dc4538cd493da1a33dda6482c332f8e8932213631ccc2355506a616772dae451d653f035c66c721bd839570d6cb55e4d2b12e8a3  fix-W_EXITCODE.patch
09caf90f7c280e484c40b4205d17b3921848dfb211b15f4126cca980eb7598c498dc0fd81fb38ca30c9f0bdab44fcb532819eab09b54d96badcffbf80695bb9b  vte-ng.patch
3e9e6394ac7e7aff8ecd6060dcf0cd0d1bf772a1417b5a1d49ad4685465d4c056a0316e54ec13a5891ea0462e5815da02e3791246c1420ac3e456d9df6f1a70f  no-setenv-after-fork.patch"
